<?php
    $customer = $data->customer;
    $customer_name = $customer->getAttribute('firstname') . ' ' . $customer->getAttribute('lastname');
?>

<div class="view">
    <table width="100%" border="0" cellspacing="2" cellpadding="0">
        <tr>
            <td><?php echo CHtml::encode($data->getAttributeLabel('id')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('customer_id')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('customer_code')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('loan_code')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('loan_amount')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('interest')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('period')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('period_type')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('paying_amount')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('installments')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('status')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('active')); ?></td>
            <td><?php echo CHtml::encode($data->getAttributeLabel('createtime')); ?></td>
        </tr>
        <tr>
            <td><?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode($customer_name), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode($data->customer_code), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode($data->loan_code), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode($data->loan_amount), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode($data->interest), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode($data->period), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode(t($data->period_type)), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode($data->paying_amount), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode($data->installments), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode(t($data->status)), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode(t($data->active ? 'Yes' : 'No')), array('view', 'id' => $data->id)); ?></td>
            <td><?php echo CHtml::link(CHtml::encode($data->createtime), array('view', 'id' => $data->id)); ?></td>
        </tr>
    </table>
    <?php /*
      <b><?php echo CHtml::encode($data->getAttributeLabel('days_of_period')); ?>:</b>
      <?php echo CHtml::encode($data->days_of_period);

      <b><?php echo CHtml::encode($data->getAttributeLabel('payment_per_installment')); ?>:</b>
      <?php echo CHtml::encode($data->payment_per_installment); ?>
      &nbsp;&nbsp;

      <b><?php echo CHtml::encode($data->getAttributeLabel('last_period_payment')); ?>:</b>
      <?php echo CHtml::encode($data->last_period_payment); ?>  

      <b>:</b>     <b><?php echo CHtml::encode($data->getAttributeLabel('updatedby_user_id')); ?>:</b>
      <?php echo CHtml::encode($data->updatedby_user_id); ?>
      &nbsp;&nbsp;

      <b><?php echo CHtml::encode($data->getAttributeLabel('modifytime')); ?>:</b>
      <?php echo CHtml::encode($data->modifytime); ?>
      &nbsp;&nbsp;

     */ ?>


</div>